3.26 \(\int \sinh ^2(\frac{1}{4}+x+x^2) \, dx\)

Optimal. Leaf size=56 \[ \frac{1}{8} \sqrt{\frac{\pi }{2}} \text{Erf}\left (\frac{2 x+1}{\sqrt{2}}\right )+\frac{1}{8} \sqrt{\frac{\pi }{2}} \text{Erfi}\left (\frac{2 x+1}{\sqrt{2}}\right )-\frac{x}{2} \]

[Out]

-x/2 + (Sqrt[Pi/2]*Erf[(1 + 2*x)/Sqrt[2]])/8 + (Sqrt[Pi/2]*Erfi[(1 + 2*x)/Sqrt[2]])/8

________________________________________________________________________________________

Rubi [A]  time = 0.0334893, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.454, Rules used = {5376, 5375, 2234, 2204, 2205} \[ \frac{1}{8} \sqrt{\frac{\pi }{2}} \text{Erf}\left (\frac{2 x+1}{\sqrt{2}}\right )+\frac{1}{8} \sqrt{\frac{\pi }{2}} \text{Erfi}\left (\frac{2 x+1}{\sqrt{2}}\right )-\frac{x}{2} \]

Antiderivative was successfully verified.

[In]

Int[Sinh[1/4 + x + x^2]^2,x]

[Out]

-x/2 + (Sqrt[Pi/2]*Erf[(1 + 2*x)/Sqrt[2]])/8 + (Sqrt[Pi/2]*Erfi[(1 + 2*x)/Sqrt[2]])/8

Rule 5376

Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]^(n_), x_Symbol] :> Int[ExpandTrigReduce[Sinh[a + b*x + c*x^2]^n, x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 1]

Rule 5375

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] + Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int \sinh ^2\left (\frac{1}{4}+x+x^2\right ) \, dx &=\int \left (-\frac{1}{2}+\frac{1}{2} \cosh \left (\frac{1}{2}+2 x+2 x^2\right )\right ) \, dx\\ &=-\frac{x}{2}+\frac{1}{2} \int \cosh \left (\frac{1}{2}+2 x+2 x^2\right ) \, dx\\ &=-\frac{x}{2}+\frac{1}{4} \int e^{-\frac{1}{2}-2 x-2 x^2} \, dx+\frac{1}{4} \int e^{\frac{1}{2}+2 x+2 x^2} \, dx\\ &=-\frac{x}{2}+\frac{1}{4} \int e^{-\frac{1}{8} (-2-4 x)^2} \, dx+\frac{1}{4} \int e^{\frac{1}{8} (2+4 x)^2} \, dx\\ &=-\frac{x}{2}+\frac{1}{8} \sqrt{\frac{\pi }{2}} \text{erf}\left (\frac{1+2 x}{\sqrt{2}}\right )+\frac{1}{8} \sqrt{\frac{\pi }{2}} \text{erfi}\left (\frac{1+2 x}{\sqrt{2}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0725557, size = 48, normalized size = 0.86 \[ \frac{1}{16} \left (\sqrt{2 \pi } \text{Erf}\left (\frac{2 x+1}{\sqrt{2}}\right )+\sqrt{2 \pi } \text{Erfi}\left (\frac{2 x+1}{\sqrt{2}}\right )-8 x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sinh[1/4 + x + x^2]^2,x]

[Out]

(-8*x + Sqrt[2*Pi]*Erf[(1 + 2*x)/Sqrt[2]] + Sqrt[2*Pi]*Erfi[(1 + 2*x)/Sqrt[2]])/16

________________________________________________________________________________________

Maple [C]  time = 0.036, size = 49, normalized size = 0.9 \begin{align*} -{\frac{x}{2}}+{\frac{\sqrt{\pi }\sqrt{2}}{16}{\it Erf} \left ( \sqrt{2}x+{\frac{\sqrt{2}}{2}} \right ) }-{\frac{i}{16}}\sqrt{\pi }\sqrt{2}{\it Erf} \left ( i\sqrt{2}x+{\frac{i}{2}}\sqrt{2} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(1/4+x+x^2)^2,x)

[Out]

-1/2*x+1/16*Pi^(1/2)*2^(1/2)*erf(2^(1/2)*x+1/2*2^(1/2))-1/16*I*Pi^(1/2)*2^(1/2)*erf(I*2^(1/2)*x+1/2*I*2^(1/2))

________________________________________________________________________________________

Maxima [C]  time = 1.55073, size = 61, normalized size = 1.09 \begin{align*} \frac{1}{16} \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (\sqrt{2} x + \frac{1}{2} \, \sqrt{2}\right ) - \frac{1}{16} i \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (i \, \sqrt{2} x + \frac{1}{2} i \, \sqrt{2}\right ) - \frac{1}{2} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(1/4+x+x^2)^2,x, algorithm="maxima")

[Out]

1/16*sqrt(2)*sqrt(pi)*erf(sqrt(2)*x + 1/2*sqrt(2)) - 1/16*I*sqrt(2)*sqrt(pi)*erf(I*sqrt(2)*x + 1/2*I*sqrt(2))
- 1/2*x

________________________________________________________________________________________

Fricas [A]  time = 2.08, size = 132, normalized size = 2.36 \begin{align*} \frac{1}{16} \, \sqrt{\pi }{\left (\sqrt{2} \operatorname{erf}\left (\frac{1}{2} \, \sqrt{2}{\left (2 \, x + 1\right )}\right ) + \sqrt{2} \operatorname{erfi}\left (\frac{1}{2} \, \sqrt{2}{\left (2 \, x + 1\right )}\right )\right )} - \frac{1}{2} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(1/4+x+x^2)^2,x, algorithm="fricas")

[Out]

1/16*sqrt(pi)*(sqrt(2)*erf(1/2*sqrt(2)*(2*x + 1)) + sqrt(2)*erfi(1/2*sqrt(2)*(2*x + 1))) - 1/2*x

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sinh ^{2}{\left (x^{2} + x + \frac{1}{4} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(1/4+x+x**2)**2,x)

[Out]

Integral(sinh(x**2 + x + 1/4)**2, x)

________________________________________________________________________________________

Giac [C]  time = 1.35562, size = 57, normalized size = 1.02 \begin{align*} \frac{1}{16} \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (\frac{1}{2} \, \sqrt{2}{\left (2 \, x + 1\right )}\right ) + \frac{1}{16} i \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\frac{1}{2} i \, \sqrt{2}{\left (2 \, x + 1\right )}\right ) - \frac{1}{2} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(1/4+x+x^2)^2,x, algorithm="giac")

[Out]

1/16*sqrt(2)*sqrt(pi)*erf(1/2*sqrt(2)*(2*x + 1)) + 1/16*I*sqrt(2)*sqrt(pi)*erf(-1/2*I*sqrt(2)*(2*x + 1)) - 1/2
*x